package com.jule.miaozhuapc.controller;

import com.jule.miaozhuapc.ano.Auth;
import com.jule.miaozhuapc.ano.TokenUser;
import com.jule.miaozhuapc.domain.WawaUser;
import com.jule.miaozhuapc.domain.WawaUserLocation;
import com.jule.miaozhuapc.dto.GameRecordDto;
import com.jule.miaozhuapc.dto.PayConfigDto;
import com.jule.miaozhuapc.dto.UserDto;
import com.jule.miaozhuapc.dto.WsUtil;
import com.jule.miaozhuapc.req.dto.Location;
import com.jule.miaozhuapc.service.*;
import com.jule.miaozhuapc.util.Const;
import org.apache.log4j.Logger;
import org.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@RequestMapping( value = Const.WAWA_HTTP_URL_V1+ "/advert")
public class AdvertController {
	private Logger logger = Logger.getLogger(AdvertController.class);

	@Autowired
	AdvertService advertService;


	//获取充值比例
	@RequestMapping(value="/getTypeAdvert",method=RequestMethod.GET)
	public @ResponseBody WsUtil getAdvert(@RequestParam( name= "type") String type) {
		WsUtil ws = new WsUtil();
		ws.setBody(advertService.findbyType(Integer.parseInt(type)));
		return ws;
	}

}